{{include template('public/header','home')}}
<style  type="text/css">
    body{overflow-x：hidden;overflow-y：auto;}
    .show_iframe{
        width: 910px;
        height: 100%;
    }
    .show_iframe iframe {
        width: 910px;
    }
</style>
<div class="row {{$template}}  {{$catinfo['arrchildid']}}" style="margin-top: 10px;" id="{{$catid}}">
    <div class="col-md-8">
        <ul id="breadcrumb" name="breadcrumb" class="breadcrumb mavbar-breadcrumb">{{get_location($catid)}}</ul>
        <h3>{{$item.title}}</h3>
        <div class="info">
            <div class="msg">
                来源：{{$item.befrom}}  &nbsp;&nbsp;
                更新时间：{{date('Y-m-d H:i:s',$item.updatetime)}}   &nbsp;&nbsp;
                编辑：{{$item.author}}  &nbsp;&nbsp;
                浏览：{{$item.views}}
            </div>
        </div>
        {{closetags($item.content)}}
        {{include template('public/page')}}
        <div class="operate">
            <span id="favorite"><a href="javascript:;" onclick="addFavorite('{{$item.title}}','{{$item.url}}');">收藏</a></span>  | <a href="javascript:;" onClick="window.print();" class="print">打印</a>
        </div>
        <div class="pn">
            <p>上一篇：{{$pre}}</p>
            <p>下一篇：{{$next}}</p>
        </div>
        <div class="clearfix"></div>
        <div class="show_iframe">
            <iframe id="ifrcommnet" name="ifrcommnet" src="/comment/index/index/?id={{$item.contentid}}&idtype=content"
                    class="flexiframe" frameborder="0" style="overflow-y: hidden;width: 910px;" ><p>Your browser does not support iframes.</p></iframe>
        </div>

    </div>
    <div class="col-md-4">
        {{include template('public/main_right','home')}}
    </div>
</div>
<script type="text/javascript">
    // 计算页面的实际高度，iframe自适应会用到
    function calcPageHeight(doc) {
    var cHeight = Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
            var sHeight = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight)
            var height = Math.max(cHeight, sHeight)
            return height
    }
    var ifr = document.getElementById('ifrcommnet');
    ifr.onload = function() {
    var iDoc = ifr.contentDocument || ifr.document
            var height = calcPageHeight(iDoc)
            ifr.style.height = height + 'px'
    }
</script>
{{include template('public/footer','home')}}
